<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
  "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
	<constant name="struts.custom.i18n.resources" value="messages" />
	<constant name="struts.i18n.encoding" value="UTF-8" />
	<package name="exception" extends="struts-default">
		<result-types>
			<result-type name="tiles"
				class="org.apache.struts2.views.tiles.TilesResult" />
		</result-types>
		<global-results>
			<result name="exception" type="tiles">global.exception</result>
		</global-results>
		<global-exception-mappings>
			<exception-mapping exception="java.lang.Exception" result="exception" />
		</global-exception-mappings>
	</package>
	<package name="main" extends="exception">
		<interceptors>
			<interceptor name="login" class="it.fc.auth.LoginIntercept" />
			<interceptor-stack name="defaultLoginStack">
				<interceptor-ref name="login" />
				<interceptor-ref name="exception" />
				<interceptor-ref name="alias" />
				<interceptor-ref name="servlet-config" />
				<interceptor-ref name="i18n" />
				<interceptor-ref name="chain" />
				<interceptor-ref name="model-driven" />
				<interceptor-ref name="fileUpload" />
				<interceptor-ref name="static-params" />
				<interceptor-ref name="params" />
				<interceptor-ref name="conversionError" />
				<interceptor-ref name="validation" />
				<interceptor-ref name="workflow" />
				<interceptor-ref name="prepare" />
			</interceptor-stack>
		</interceptors>

		<default-interceptor-ref name="defaultLoginStack" />

		<default-action-ref name="home" />

		<global-results>
			<result name="login" type="tiles">users.login</result>
			<result name="admin" type="tiles">admin</result>
			<result name="exception" type="tiles">global.exception</result>
		</global-results>

		<action name="home" class="it.fc.action.FcAction">
			<result name="success" type="tiles">main</result>
		</action>
	</package>

	<include file="users.xml"></include>
	<include file="giocatori.xml"></include>
	<include file="admin.xml"></include>
	<include file="auth.xml"></include>
</struts>


